/*
 ============================================================================
 Name		: Util.h
 Author	  : samuelmo
 Version	 : 1.0
 Copyright   : 
 Description : CUtil declaration
 ============================================================================
 */

#ifndef UTIL_H
#define UTIL_H

// INCLUDES
#include <e32std.h>
#include <e32base.h>
#include <charconv.h>
#include <cdblen.h>

class TProxyItem
{
public:
	TBuf8<21> iServerAndPort;
	TBool iProxy;
};

class TIap
{
public:
	TUint32 iId;
	TBuf<KCommsDbSvrMaxFieldLength> iName;
};

class StrUtil
{
public:
	static HBufC16* ConvertToUnicode(const TDesC8& text, TUint aCharset = KCharacterSetIdentifierUtf8);
	static HBufC8* ConvertFromUnicode(const TDesC& text, TUint aPrimCharacter = KCharacterSetIdentifierUtf8);
	static TTime ParseTime(const TDesC8& aTime);
	
	static void Log(const TDesC& aLog);
	static void Log(const TDesC8& aLog);
	
	static void GetIAP(RArray<TIap>& iaps);
};

#endif // UTIL_H
